// com/ptms/ptmsbackend/PtmsBackendApplication.java
package com.ptms.ptmsbackend;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.boot.autoconfigure.domain.EntityScan;

@SpringBootApplication
@ComponentScan(basePackages = "com.ptms") // 扫描所有业务组件
@EnableJpaRepositories(basePackages = "com.ptms.repository") // 扫描 JPA 仓库
@EntityScan(basePackages = "com.ptms.entity") // 扫描实体类（关键新增）
public class PtmsBackendApplication {
    public static void main(String[] args) {
        SpringApplication.run(PtmsBackendApplication.class, args);
    }
}